<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="com.wowangz.cms.syscore.autotask.pojo.StoreMenu" %>
<%@ page import="com.wowangz.cms.syscore.autotask.pojo.StoreLoginUser" %>
<%@ page import="com.wowangz.cms.common.utils.DataFormat"%>
<%@ page import="java.util.List" %>
<%-- 引入页面头 --%>
<%@ include file="/pageHead.jsp" %><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="renderer" content="webkit"/>
<title>页面布局</title>
</head>
<body class = "easyui-layout">
<div class="cs-north" region="north" border="true">
	<!--header start--> 
	<div class="header-wrap">
		<!--top--> 
		<div class="header">
			<!--logo--> 
			<h1>logo<span></span></h1>
			
			<!--toplinks-->
			<div class="toplinks-box">
				<ul class="links-other">
					<li>
						<a title="<%=MessageResourcesUtils.getMessage(request, "common.main.logininfo")%>">
							<span class="ico-user"></span>
							<label><%=userContext.getLoginUser().getUsername() %></label>
						</a>
					</li>
					<li>
						<a href="#" title="<%=MessageResourcesUtils.getMessage(request, "common.password.edit")%>" onClick="javascript:headNavigation('${systemctx}/login/intoResetPassword.json')">
							<span class="ico-pass"></span>
							<label><%=MessageResourcesUtils.getMessage(request, "common.password.edit")%></label>
						</a>
					</li>
					<li>
						<a href="#" title="<%=MessageResourcesUtils.getMessage(request, "common.logout.logout")%>" onClick="javascript:headNavigation('${systemctx}/logout.jsp')">
							<span class="ico-logout" ></span>
							<label><%=MessageResourcesUtils.getMessage(request, "common.main.logout")%></label>
						</a>
					</li>
				</ul>
				<!--<label><%=DataFormat.formatDate(userContext.getLoginDate(), DataFormat.DT_YYYYMMDD_HHMMSS) %></label>-->
			</div>	
		</div>
		<!--nav--> 
		<div class="nav-wrap">
			<span class="nav-left"><i></i></span>
			<span class="nav-right"><i></i></span>
			<div class="nav-box">
				<ul>
					<!-- 待办任务大菜单（屏蔽） -->
					<%-- <li id="li_home"><a id="a_home" href="javascript:void(0);" onclick="getMenu('home');" ><%=MessageResourcesUtils.getMessage(request, "systemmanage.home.title")%></a></li> --%>
					<c:forEach var="i" items="${headMenuList}" varStatus="r">
				     	<li id="li_${i.menucode}"><a id="a_${i.menucode}" href="javascript:void(0);" onclick="getMenu('${i.menucode}');" >${i.menuname}</a></li>
			   		</c:forEach>
				</ul>
			</div>
		</div>
	</div>
	<!--header end--> 
</div>  
<div region="south" border="false" id="south"></div>  
<!--  split="true" title="菜单区" -->
<div class="cs-west" region="west" border="true" >
	<!--sidenav start-->
	<div class="na-sidenav-box">
		<div class="na-sidenav">
			<!-- 待办任务小菜单（屏蔽） -->
			<%-- <div id="div_home">
		    	<div title="<%=MessageResourcesUtils.getMessage(request, "systemmanage.home.title")%>">
			         <p><a href="javaScript:void(0);" src ="${systemctx}/systemmanage/index/toHomePage.web" class="cs-navi-tab"><%=MessageResourcesUtils.getMessage(request, "systemmanage.home.title")%></a></p>
		    	</div>
		    </div> --%>
		 	<c:forEach var="a" items="${headMenuList}" varStatus="index">
				<div id="div_${a.menucode}" style="display:none;">
					<div title="${a.menuname}">
						<c:forEach var="b" items="${a.childrenList}" varStatus="r">
							<p><a href="javaScript:void(0);" src ="${systemctx }/${b.menupath}" class="cs-navi-tab">${b.menuname}</a></p>
						</c:forEach>
					</div>
				</div>
			</c:forEach>
		    <%-- <div id="div_content" style="display:none;">
		    	<div title="内容发布">
			         <p><a href="javaScript:void(0);" src ="${systemctx}/topic/colunm/toColumnListPage.web" class="cs-navi-tab">栏目管理</a></p>
			         <p><a href="javaScript:void(0);" src ="${systemctx}/topic/news/toNewsListPage.web" class="cs-navi-tab">资讯管理</a></p>
			         <p><a href="javaScript:void(0);" src ="${systemctx}/topic/poster/toPosterListPage.web" class="cs-navi-tab">广告管理</a></p>
		    	</div>
		    </div> --%>
		</div>
	</div>
	<!--sideNav end-->
</div>  

<!--rightContent start-->   
<div class="main-box" id="mainPanle" region="center" border="true" border="false">
	<div class="main" id="tabs" fit="true" border="false" >
		<iframe id="mainiframe" scrolling="auto" frameborder="0"  src="${systemctx}/systemmanage/index/toWelcomePage.web" style="height:99%; width:100%;"></iframe>
		<%-- <iframe id="mainiframe" scrolling="auto" frameborder="0"  src="${systemctx}/systemmanage/index/toHomePage.web" style="height:99%; width:100%;"></iframe> --%>
	</div>
</div>
<!--rightContent end--> 

   
<script type="text/javascript">
   	$(function(){
	   	if ("${userContext.loginUser.isprompt}" == '<%=SysConstant.Boolean.TRUE%>') {
		   	var str1 = '<%=MessageResourcesUtils.getMessage(request, "common.tip.password.invalid1")%>';
		   	var str2 = '<%=MessageResourcesUtils.getMessage(request, "common.tip.password.invalid2")%>';
		   	alert(str1 + "${userContext.loginUser.days}" + str2);
	   	}
	   	$('.cs-navi-tab').click(function(){
		   	var $this = $(this);
		   	var href = $this.attr('src');
		   	var title = $this.text();
           	addPanel(href,title);
    	});
	   	
	   	$("#a_home").click();
     });

   function addPanel(url,title) {
	   document.getElementById('mainiframe').src=url;
   }

   function headNavigation(arg0) {
		$('#mainiframe').attr('src', arg0);
	}
   
    var lastestModul = "";
	function getMenu(obj)
	{
		//隐藏之前的modol
		if(lastestModul != "")
		{
			var div_lastest = document.getElementById("div_"+lastestModul);
			div_lastest.style.display = "none";
			
			$("#a_" + lastestModul).removeClass("on");
			$("#li_" + lastestModul).removeClass("nomid");
		}
		var div_1 = document.getElementById("div_"+obj);
		div_1.style.display = "";
		lastestModul = obj;
		
		$("#a_" + obj).addClass("on");
		$("#li_" + obj).addClass("nomid");
	}
   
   
</script>
</body>
</html>